<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>申请试吃</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/cart.css" />
    <style type="text/css">
        .foretaste .tab span {
            font-size: 16px;
            color: #333;
            display: inline-block;
            width: 33.3%;
            text-align: center;
            height: 40px;
            line-height: 40px;
        }
        /*marquee{*/
            /*color: #ff0a03;*/
            /*font-size: 15px;*/
            /*letter-spacing:5px;*/
        /*}*/
        .wrapper{
            white-space: nowrap;
            overflow: hidden;
            /*width: 300px;*/
        }
        .inner{
            /*width:1000px;*/
            /*overflow:hidden;*/
        }
        .inner p{
            height: 25px;
            line-height: 25px;
            display:inline-block;
            color: #ff0a03;
            font-size: 13px;
            letter-spacing:8px;
        }

    </style>
</head>
<body>
<div class="detail">
    <div class="foretaste">
        <div class="tab" style="z-index: 99;">
            <span onclick="header('start')" <eq name="cate" value="start"> class="on"</eq> >正在试吃</span><span onclick="header('nostart')" <eq name="cate" value="nostart"> class="on"</eq>>即将试吃</span><span onclick="header(4)" <eq name="cate" value="4"> class="on"</eq>>试吃结束</span>
        </div>
        <div id="wrapper" class="wrapper">
            <div class="inner">
                <p class="txt"><span >此活动仅限武汉参加！</span></p>
            </div>
        </div>
        <div id="tab-content">
            <!--<marquee behavior="scroll" direction="left" style="" onmouseover=this.stop(); onmouseout=this.start()>此活动仅限武汉参加!此活动仅限武汉参加!</marquee>-->

            <div class="list">
                <ul>
                    <volist name="foretaste" id="vo">
                        <li onclick="window.location.href='__MODULE__/Foretaste/pro/gid/{$vo.id}'">
                            <div class="pic"><img src="<?= isMorePic($vo['h_imgs'])?>"/></div>
                            <div class="proname">
                                <h2>{$vo.title}</h2>
                                <h4>库存<span>{$vo.num}</span>份</h4>
                                <p><span><b>{$vo.price}</b>积分申请<?=getunit($vo['category'])?></span><input type="button"  value="{$vo.button}" /></p>
                            </div>
                        </li>
                    </volist>

                </ul>
            </div>
            <div class="noproduct" <if condition="$foretaste">style="display:none"</if>><p>对不起，试吃活动暂未开始<br>
            详情请查看试吃列表</p><p><img src="__PUBLIC__/Wx/img/no.png"/></p></div>
    </div>
</div>
</div>
<!--引用悬浮公共导航文件-->
<include file="Public:nav" />
<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery.js"></script>
<!--循环滚动字幕-->
<script type="text/javascript">
    var wrapper = document.getElementById('wrapper');
    var inner = wrapper.getElementsByTagName('div')[0];
    var p = document.getElementsByTagName('p')[0];
    var p_w = p.offsetWidth;
    var wrapper_w = wrapper.offsetWidth;
    if(!p.firstChild.style.paddingRight){
        p.firstChild.style.cssText= "padding-right:"+(wrapper_w-p_w)+"px";
        p_w = p.offsetWidth;
    }//end if
    window.onload=function fun(){
        if(wrapper_w > p_w){ return false;}
        inner.innerHTML+=inner.innerHTML;
        setTimeout("fun1()",0);
    };
    function fun1(){
        if(p_w > wrapper.scrollLeft){
            wrapper.scrollLeft++;
            setTimeout("fun1()",15);
        }
        else{
            setTimeout("fun2()",0);
        }//end if
    }//end fun
    function fun2(){
        wrapper.scrollLeft=0;
        fun1();
    }//end fun
</script>

<script type="text/javascript">
    $('.tab span').click(function(){
        $(this).addClass("on").siblings().removeClass()
    });

    function header(cate) {
        $.post('__MODULE__/Foretaste/index',{'cate':cate},function (date) {
            var div = $(date).find(".list,.noproduct");//获取接收的html页面中的选择部分
            $("div#tab-content").html(div);//替换掉对应html内容
        })
    }//end fun

    $(".click span").click(function(){
        if($(this).text() ==="导航"){
            $(this).text("收起");
            $('.link02').css('display','block')
        }else{
            $(this).text("导航");
            $('.link02').css('display','none')
        }//end if
    });//end fun
</script>
</body>
</html>
